<div class="layui-fluid nepadmin-pad0 nepadmin-mar0 list0"  lay-title="参数设置">
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card layui-tab layui-tab-brief" style="margin: 0;">
                    <ul class="layui-tab-title">
                        <li class="layui-this" value="1" click_num="1">违约金设置</li>
                        <li value="2" click_num="1">代理佣金设置</li>
                        <li value="3" click_num="1">会员分红设置</li>
                        <li value="4" click_num="1">提款设置</li>
                        <li value="5" click_num="1">充值设置</li>
                        <li value="6" click_num="1">小程序设置</li>
                        <li value="7" click_num="1">公众号设置</li>
                        <li value="8" click_num="1">会员注册赠送金额</li>
                        <li value="9" click_num="1">会员扣费现金占比</li>
                    </ul>
                    <div class="layui-card-body layui-tab-content hxr-card-body" style="padding: 15px;">
                        <div class="layui-tab-item layui-show" id="bonusset">
                            <div class=" layui-form">
                                <form id="break_set" lay-filter="aa">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">违约金额</label>
                                        <div class="layui-input-inline">
                                            <input type="number" v-model="detail.value" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入金额">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">是否启用</label>
                                        <div class="layui-input-inline">
                                            <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"></label>
                                        <div class="layui-input-inline">
                                            <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit1" >保存</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="layui-tab-item">
                            <div class="layui-form" id="commissionset">
                            <form id="commission">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">佣金比例</label>
                                    <div class="layui-input-inline">
                                        <input type="number" style="display: inline-block;width: 90%;" v-model="detail.key_value" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入佣金比例">%
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否启用</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"></label>
                                    <div class="layui-input-inline">
                                        <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit2">保存</button>
                                    </div>
                                </div>
                            </form>
                            </div>
                        </div>
                        <div class="layui-tab-item">
                            <div class="layui-form" id="damagesset">
                            <form id="benefit">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">分红比例</label>
                                    <div class="layui-input-inline">
                                        <input type="number" style="display: inline-block;width: 90%;" v-model="detail.key_value" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入分红比例">%
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否启用</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"></label>
                                    <div class="layui-input-inline">
                                        <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit3">保存</button>
                                    </div>
                                </div>
                            </form>
                            </div>
                        </div>
                        <div class="layui-tab-item">
                            <div class="layui-form" id="drawingsset" lay-filter='asdasdasd'>
                            <form id="drawset" >
                                <div class="layui-form-item verify">
                                    <label class="layui-form-label">单笔提款最小金额(元)</label>
                                    <div class="layui-input-block layui-input-inline">
                                        <input type="number" v-model="detail.value.min_money" autocomplete="off" verify="require|znum" class="layui-input" placeholder="请输入最小金额" style="margin-left: -110px;">
                                        <span class="hint">单笔提款最小金额必填</span>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux" style="margin-left: -110px;">为0时不做限制</div>
                                </div>
                                <div class="layui-form-item verify">
                                    <label class="layui-form-label">单笔提款最大金额(元)</label>
                                    <div class="layui-input-block layui-input-inline">
                                        <input type="number" v-model="detail.value.max_money" autocomplete="off" verify="require|znum" class="layui-input" placeholder="请输入最大金额" style="margin-left: -110px;">
                                        <span class="hint">单笔提款最大金额必填</span>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux" style="margin-left: -110px;">为0时不做限制</div>
                                </div>
                                <div class="layui-form-item verify">
                                    <label class="layui-form-label">当日提款总金额(元)</label>
                                    <div class="layui-input-block layui-input-inline">
                                        <input type="number" v-model="detail.value.count_money" autocomplete="off" verify="require|znum" class="layui-input" placeholder="请输入总金额" style="margin-left: -110px;">
                                        <span class="hint">当日提款总金额必填</span>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux" style="margin-left: -110px;">为0时不做限制</div>
                                </div>
                                <div class="layui-form-item verify">
                                    <label class="layui-form-label">当日提款总次数</label>
                                    <div class="layui-input-block layui-input-inline">
                                        <input type="number" v-model="detail.value.count_num" autocomplete="off" verify="require|znum" class="layui-input" placeholder="请输入总次数" style="margin-left: -110px;">
                                        <span class="hint">当日提款总次数必填</span>
                                    </div>
                                    <div class="layui-form-mid layui-word-aux" style="margin-left: -110px;">为0时不做限制</div>
                                </div>
                                <div class="layui-form-item verify">
                                    <label class="layui-form-label">可提款日期</label>
                                    <div class="layui-input-block" style="display: block;width: 520px; margin-left: 180px;" >
                                        <input type="checkbox"  lay-skin="primary" name="withdrawal_date[1]" title="1号" value="1" class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[2]" title="2号" value="2" class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[3]" title="3号" value="3"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[4]" title="4号" value="4"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[5]" title="5号" value="5"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[6]" title="6号" value="6"class="withdrawal_date">
                                         <input type="checkbox"  lay-skin="primary" name="withdrawal_date[7]" title="7号" value="7"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[8]" title="8号" value="8"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[9]" title="9号" value="9"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[10]" title="10号" value="10"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[11]" title="11号" value="11"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[12]" title="12号" value="12"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[13]" title="13号" value="13"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[14]" title="14号" value="14"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[15]" title="15号" value="15"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[16]" title="16号" value="16"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[17]" title="17号" value="17"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[18]" title="18号" value="18"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[19]" title="19号" value="19"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[20]" title="20号" value="20"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[21]" title="21号" value="21"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[22]" title="22号" value="22"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[23]" title="23号" value="23"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[24]" title="24号" value="24"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[25]" title="25号" value="25"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[26]" title="26号" value="26"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[27]" title="27号" value="27"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[28]" title="28号" value="28"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[29]" title="29号" value="29"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[30]" title="30号" value="30"class="withdrawal_date">
                                         <input type="checkbox" lay-skin="primary" name="withdrawal_date[31]" title="31号" value="31"class="withdrawal_date">
                                    </div>
                                </div>
								<div class="layui-form-item verify">
								  <label class="layui-form-label">提款时段</label>
								  <div class="layui-input-block flex">
									  <div class="layui-unselect layui-form-select">
										<div class="layui-select-title">
                                            <input type="text" verify="require" name="start_time" placeholder="请选择时间" class="layui-input layui-unselect" readonly><i class="layui-edge"></i>
                                        </div>
										<dl class="layui-anim layui-anim-upbit">
											<dd class="layui-select-tips layui-this">请选择时间</dd>
											<dd :data='index' v-for="(x,index) in times">{{x.time}}</dd>
										</dl>
									  </div>
									   <span style="padding: 0 10px;">~</span> 
										<div class="layui-unselect layui-form-select">
											<div class="layui-select-title"><input type="text" verify="require" name="end_time" placeholder="请选择时间" class="layui-input layui-unselect" readonly><i
												 class="layui-edge"></i></div>
											<dl class="layui-anim layui-anim-upbit">
												<dd class="layui-select-tips layui-this">请选择时间</dd>
												<dd :data='index' v-for="(x,index) in times">{{x.time}}</dd>
											</dl>
										</div>
										<span class="hint">计费时段必选</span>
								  </div>
								</div>
                                <div class="layui-form-item verify">
                                    <label class="layui-form-label">单笔提款手续费</label>
                                    <div class="layui-input-block layui-input-inline">
                                        <input type="number" v-model="detail.value.fee" autocomplete="off" verify="require|znum" class="layui-input" placeholder="请输入手续费" style="margin-left: -110px;">
                                        <span class="hint">单笔提款手续费必填</span>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否启用</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                                    </div>
                                </div>
								<div class="layui-form-item">
								    <label class="layui-form-label">手续费类型</label>
								    <div class="layui-input-inline">
								        <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.value.each_stroke_type==1}" lay-skin="_switch" @click="radiosF()" ><em>{{detail.value.each_stroke_type==1?'单笔(元)':'千分比'}}</em><i></i></div>
                            </div>
								</div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"></label>
                                    <div class="layui-input-inline">
                                        <button type="button" class="layui-btn" style="width: 190px;" lay-submit lay-filter="form-submit4" @click="submit">保存</button>
                                    </div>
                                </div>
                            </form>
                            </div>
                        </div>
                        <div class="layui-tab-item">
                            <div class="layui-form" id="rechargeset">

                                <div class="layui-form-item">
                                    <label class="layui-form-label">充值金额</label>
                                    <div class="layui-input-inline flex" style="width: 500px;">
                                        <input style="margin-right: 30px;" type="number" v-model="full" autocomplete="off" name="username" class="layui-input" placeholder="充值金额">
                                        <input style="margin-right: 30px;" type="number" v-model="reduce" autocomplete="off" name="username" class="layui-input" placeholder="赠送金额">
                                        <button type="button" class="layui-btn" @click="add">添加</button>
                                    </div>
                                </div>
                                <div class="layui-form-item" v-if="detail.value.length">
                                    <label class="layui-form-label">已设置金额</label>
                                    <div class="layui-input-inline" style="width: 500px;">
                                        <table class="layui-table">
                                            <thead>
                                            <tr>
                                                <th>充值金额</th>
                                                <th>赠送金额</th>
                                                <th>操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr v-for="(x,index) in detail.value">
                                                <td>{{x.full}}</td>

                                                <td>{{x.reduce}}</td>
                                                <td>
                                                    <a class="layui-btn layui-btn-danger layui-btn-xs" style="display: block !important;" @click="del(index)"><i class="layui-icon layui-icon-delete"></i>删除</a>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">描述</label>
                                    <div class="layui-input-inline" style="width: 500px;">
                                        <textarea type="text" class="layui-textarea" v-model="detail.description" verify='require'></textarea>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否自定义充值金额</label>
                                    <div class="layui-input-inline flex" style="width: 500px;">
                                        <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==0}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==0?'是':'否'}}</em><i></i></div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"></label>
                                    <div class="layui-input-inline flex">
                                        <button type="button" class="layui-btn" style="width: 200px;" @click="save">保存</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        
                                                
                        <div class="layui-tab-item">
                            <div class="layui-form" id="applet" lay-filter='applet'>
                            <form id="applets">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">小程序ID</label>
                                    <div class="layui-input-inline">
                                        <input type="text" style="display: inline-block;width: 90%;" v-model="detail.value.applet_id" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入小程序ID">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">小程序秘钥</label>
                                    <div class="layui-input-inline">
                                        <input type="text" style="display: inline-block;width: 90%;" v-model="detail.value.applet_key" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入小程序秘钥">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否启用</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"></label>
                                    <div class="layui-input-inline">
                                        <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit6">保存</button>
                                    </div>
                                </div>
                            </form>
                            </div>
                        </div>
                        
                        
                        <div class="layui-tab-item">
                            <div class="layui-form" id="open">
                            <form id="opens">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">公众号ID</label>
                                    <div class="layui-input-inline">
                                        <input type="text" style="display: inline-block;width: 90%;" v-model="detail.value.open_id" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入公众号ID">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">公众号秘钥</label>
                                    <div class="layui-input-inline">
                                        <input type="text" style="display: inline-block;width: 90%;" v-model="detail.value.open_key" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入公众号秘钥">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否启用</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label"></label>
                                    <div class="layui-input-inline">
                                        <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit7">保存</button>
                                    </div>
                                </div>
                            </form>
                            </div>
                        </div>
                        <!--注册赠送免费上网时间-->
                        <div class="layui-tab-item">
                            <div class="layui-form" id="give_time">
                                <form id="give_times">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">赠送时长(h)</label>
                                        <div class="layui-input-inline">
                                            <input type="number" style="display: inline-block;width: 90%;" v-model="detail.key_value" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入分红比例">%
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">是否启用</label>
                                        <div class="layui-input-inline">
                                            <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"></label>
                                        <div class="layui-input-inline">
                                            <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit8">保存</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!--注册赠送免费上网时间end-->
                        <!--扣费现金余额占比-->
                        <div class="layui-tab-item">
                            <div class="layui-form" id="hotel_ratio">
                                <form id="hotel_ratios">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">赠送时长(最大为1)</label>
                                        <div class="layui-input-inline">
                                            <input type="number" style="display: inline-block;width: 90%;" v-model="detail.key_value" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入分红比例">%
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"></label>
                                        <div class="layui-input-inline">
                                            <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit9">保存</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!--扣费现金余额占比end-->
                    </div>
                    <!-- <div class="layui-card-header">违约金设置</div>
                    <div class="layui-card-body hxr-card-body" style="padding: 15px;">
                    <div class="layui-tab-item layui-show">
                        <div class=" layui-form">
                        <form id="change_pwd" lay-filter="aa">
                          <div class="layui-form-item">
                            <label class="layui-form-label">违约金额</label>
                            <div class="layui-input-inline">
                              <input type="number" v-model="detail.value" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入金额">
                            </div>
                          </div>
                          <div class="layui-form-item">
                            <label class="layui-form-label">是否启用</label>
                            <div class="layui-input-inline">
                               <div class="layui-unselect layui-form-switch" :class="{'layui-form-onswitch':detail.status==1}" lay-skin="_switch" @click="radioF()"><em>{{detail.status==1?'启用':'停用'}}</em><i></i></div>
                            </div>
                          </div>
                          <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-inline">
                              <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit">保存</button>
                            </div>
                          </div>
                       </form>
                       </div>
                   </div>
                  <div class="layui-tab-item">
                        <form id="change_cash_pwd">
                            <div class=" layui-form">
                            <div class="layui-form-item">
                              <label class="layui-form-label">当前提现密码</label>
                              <div class="layui-input-inline">
                                <input type="password" name="before_cash_pwd"  lay-verify="required" autocomplete="off" class="layui-input">
                              </div>
                            </div>
                            <div class="layui-form-item">
                              <label class="layui-form-label">提现新密码</label>
                              <div class="layui-input-inline">
                                <input type="password" name="after_cash_pwd" lay-verify="required" autocomplete="off" class="layui-input">
                              </div>
                            </div>
                            <div class="layui-form-item">
                              <label class="layui-form-label">确认提现新密码</label>
                              <div class="layui-input-inline">
                                <input type="password" name="after_cash_pwd_confim" lay-verify="required" autocomplete="off" class="layui-input">
                              </div>
                            </div>
                            <div class="layui-form-item">
                              <label class="layui-form-label"></label>
                              <div class="layui-input-inline">
                                <a class="layui-btn" lay-submit style="width: 200px;" lay-filter="go">保存</a>
                              </div>
                            </div>
                            </form>
                        </div> -->

                </div>
            </div>
        </div>
    </div>
</div>
</div>
<style type="text/css">
    #drawingsset .layui-form-label{
        width: 150px;
    }

    #break_set .layui-form-label{
        width: 150px;
    }
    #commission .layui-form-label{
        width: 150px;
    }
    #benefit .layui-form-label{
        width: 150px;
    }
    #applets .layui-form-label{
        width: 150px;
    }    
    #opens .layui-form-label{
        width: 150px;
    }    
    #drawset .layui-form-label{
        width: 150px;
    }
    #recharge .layui-form-label{
        width: 150px;
    }
	#rechargeset .layui-btn-danger{
		display: inline-block !important; 
	}

</style>
<script>
    layui.use(['form','element'], function(form,element){
        var $ = layui.$,element = layui.element;
        var form = layui.form;
        var vm=new Vue({
            el:'#bonusset',
            data:{
                detail:{

                },
                old_detail:{}
            },
            mounted:function() {
                //初始化
                $(".layui-this").attr('click_num',2);
                var _this=this;
                layui.admin.ajax('deposit/get_congfig',{},1).then(function(res){
                    res.data.status?res.data.status:res.data.status=2;
                    _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                });
                //提交form
                form.on('submit(form-submit1)',function(data){
                    if(_this.detail.key_value<0||_this.detail.key_value>100){
                        return layui.admin.ahint(2,'请输入0到100之间的数字');
                    }
                    var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                    if(data){
                        layui.admin.ajax('deposit/set_congfig',data).then(function(res){
                            _this.old_detail=JSON.stringify(_this.detail);
                        });
                    }else{
                        layer.msg('无修改');
                    }
                })
            },
            methods:{
                radioF:function(){//radio选择
                    this.detail.status==1?this.detail.status=2:this.detail.status=1;
                }
            }
        })
        element.on('tab()', function(){
            var item_val=$(this).attr('value'),id_name='bonusset',get_config_url='deposit/get_congfig',ajax_url='deposit/set_congfig';
            if ($(this).attr('click_num')!=1) return false;
            $(this).attr('click_num',2);
            if (item_val==1){//违约金
                id_name='bonusset';get_config_url='deposit/get_congfig';ajax_url='deposit/set_congfig';
                var vm=new Vue({
                    el:'#'+id_name,
                    data:{
                        detail:{

                        },
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax(get_config_url,{},1).then(function(res){
                            res.data.status?res.data.status:res.data.status=2;
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        });
                        //提交form
                        form.on('submit(form-submit1)',function(data){
                            if(_this.detail.key_value<0||_this.detail.key_value>100){
                                return layui.admin.ahint(2,'请输入0到100之间的数字');
                            }
                            var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                            if(data){
                                layui.admin.ajax('deposit/set_congfig',data).then(function(res){
                                    _this.old_detail=JSON.stringify(_this.detail);
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        })
                    },
                    methods:{
                        radioF:function(){//radio选择
                            this.detail.status==1?this.detail.status=2:this.detail.status=1;
                        }
                    }
                })
            }else if (item_val==2){//代理佣金
                id_name='commissionset';get_config_url='withdraw/get_congfig';ajax_url='withdraw/set_congfig';
                var vm=new Vue({
                    el:'#'+id_name,
                    data:{
                        detail:{

                        },
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax(get_config_url,{},1).then(function(res){
                            res.data.status?res.data.status:res.data.status=2;
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        });
                        //提交form
                        form.on('submit(form-submit2)',function(data){
                            if(_this.detail.key_value<0||_this.detail.key_value>100){
                                return layui.admin.ahint(2,'请输入0到100之间的数字');
                            }
                            var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                            if(data){
                                layui.admin.ajax(ajax_url,data).then(function(res){
                                    _this.old_detail=JSON.stringify(_this.detail);
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        })
                    },
                    methods:{
                        radioF:function(){//radio选择
                            this.detail.status==1?this.detail.status=2:this.detail.status=1;
                        }
                    }
                })
            }else if (item_val==3){//分红设置
                id_name='damagesset';get_config_url='bonus/get_congfig';ajax_url='bonus/set_congfig';
                var vm=new Vue({
                    el:'#'+id_name,
                    data:{
                        detail:{

                        },
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax(get_config_url,{},1).then(function(res){
                            res.data.status?res.data.status:res.data.status=2;
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        });
                        //提交form
                        form.on('submit(form-submit3)',function(data){
                            if(_this.detail.key_value<0||_this.detail.key_value>100){
                                return layui.admin.ahint(2,'请输入0到100之间的数字');
                            }
                            var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                            if(data){
                                layui.admin.ajax(ajax_url,data).then(function(res){
                                    _this.old_detail=JSON.stringify(_this.detail);
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        })
                    },
                    methods:{
                        radioF:function(){//radio选择
                            this.detail.status==1?this.detail.status=2:this.detail.status=1;
                        }
                    }
                })
            }else if (item_val==4){//提款设置

                var vm=new Vue({
                    el:'#drawingsset',
                    data:{
                        detail:{
                            value:{}
                        },
						times:[],
                        time_detail:layui.admin.time_detail,
                        full:'',
                        reduce:'',
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax('withdraw/get_congfig_list',{},1).then(function(res){
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        //    res.data.value.withdrawal_date=res.data.value.withdrawal_date.split(',');

                            form.val("asdasdasd",res.data.value);
                            if (res.data.value.withdrawal_date){
                                var withdrawal_date=res.data.value.withdrawal_date;
                                for (var j = 0; j < withdrawal_date.length; j++) {
                                    var unitTypeCheckbox = $(".withdrawal_date");
                                    for (var i = 0; i < unitTypeCheckbox.length; i++) {
                                        if (unitTypeCheckbox[i].value == withdrawal_date[j]) {

                                            unitTypeCheckbox[i].checked = true;
                                        }
                                    }
                                }
                        }
                            form.render();
                        });

                        for(var i=0; i<25; i++){
                            this.times.push({time:(i<10?'0'+i:i)+':00'})
                        }


                    },
                    methods:{

                        radioF:function(){//radio选择

                            this.detail.status==1?this.detail.status=2:this.detail.status=1;
                        },
						radiosF:function(){

							this.detail.value.each_stroke_type==1?this.detail.value.each_stroke_type=2:this.detail.value.each_stroke_type=1;
						},
                        submit:function(){
                            var _this=this;
                            var data1 = form.val("asdasdasd");

                            var withdrawal_date=[];
                            if(layui.admin.form('#drawingsset')){
                                for (i in data1){
                                 if (i.indexOf('withdrawal_date')>-1){
                                     withdrawal_date.push(data1[i]);
                                 }
                                }
                                _this.detail.value.withdrawal_date=withdrawal_date;
                                _this.detail.value.start_time=form.val("asdasdasd").start_time;
                                _this.detail.value.end_time=form.val("asdasdasd").end_time;
                                var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail)),datas={};


                                if(data){
                                    datas=_this.detail.value;

                                    datas.status=_this.detail.status;
                                    datas.each_stroke_type=_this.detail.value.each_stroke_type;
                                     datas.withdrawal_date=_this.detail.value.withdrawal_date.join(',');

                                    layui.admin.ajax('withdraw/set_config',datas).then((res)=>{
                                        _this.old_detail=JSON.stringify(_this.detail);
                                    }).catch((res)=>{});
                                }else{
                                    layer.msg('无修改');
                                }
                            }
                        }
                    }
                })
            }else if (item_val==5){//充值设置
                id_name='rechargeset';get_config_url='deposit/get_congfig';ajax_url='bonus/set_congfig';
                var vm=new Vue({
                    el:'#rechargeset',
                    data:{
                        detail:{
                            value:[],
                            status:0
                        },
                        full:'',
                        reduce:'',
                        old_detail:{}
                    },
                    mounted() {
                        var _this=this;
                        layui.admin.ajax('recharges/list',{},1).then(function(res){
                            res.data.value?res.data.value:res.data.value=[];
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        });
                    },
                    methods:{
                        radioF(){//radio选择
                            this.detail.status==1?this.detail.status=0:this.detail.status=1;
                        },
                        add(){
                            if(!this.full){
                                return layui.admin.ahint(2,'请输入充值金额');
                            }else if(this.full<0){
                                return layui.admin.ahint(2,'金额不能为负数');
                            }
                            if(!this.reduce){
                                return layui.admin.ahint(2,'请输入赠送金额');
                            }
                            this.detail.value.push({
                                full:this.full,
                            	reduce:this.reduce
                            });
                            this.full='',this.reduce='';
                        },
                        save(){
                            var data=layui.admin.filter(this.detail,JSON.parse(this.old_detail)),_this=this;
                            if(data){
                                if(data.value)data.value=JSON.stringify(data.value);
                                layui.admin.ajax('recharges/update',data).then(function(res){
                                    //_this.old_detail=JSON.stringify(_this.detail);
                                   // layui.view.tab.refresh('/recharge/rechargelist');
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        },
                        del(index){
                            this.detail.value.splice(index,1);
                        }
                    }
                })
            }else if (item_val==6){//小程序设置
                id_name='applet';get_config_url='config/applet_config';ajax_url='config/set_applet';
                var vm=new Vue({
                    el:'#'+id_name,
                    data:{
                        detail:{
                            value:{}
                        },
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax(get_config_url,{},1).then(function(res){
                           // res.data.status?res.data.status:res.data.status=2;
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);

                            //form.val("applet",res.data.value);
                        });
                        //提交form
                        form.on('submit(form-submit6)',function(data){
                            /* if(_this.detail.key_value<0||_this.detail.key_value>100){
                                return layui.admin.ahint(2,'请输入0到100之间的数字');
                            } */

                            var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                            if(data){
                                if(data.value)data.value=JSON.stringify(data.value);
                                layui.admin.ajax(ajax_url,data).then(function(res){
                                    _this.old_detail=JSON.stringify(_this.detail);
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        })
                    },
                    methods:{
                        radioF:function(){//radio选择
                            this.detail.status==1?this.detail.status=2:this.detail.status=1;
                        }
                    }
                })
            }else if (item_val==7){//公众号设置
                id_name='open';get_config_url='config/open_config';ajax_url='config/set_open';
                var vm=new Vue({
                    el:'#'+id_name,
                    data:{
                        detail:{
                            value:{}
                        },
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax(get_config_url,{},1).then(function(res){
                            //res.data.status?res.data.status:res.data.status=2;
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        });
                        //提交form
                        form.on('submit(form-submit7)',function(data){
                        	
                            var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                            if(data){
                                if(data.value)data.value=JSON.stringify(data.value);
                                layui.admin.ajax(ajax_url,data).then(function(res){
                                    _this.old_detail=JSON.stringify(_this.detail);
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        })
                    },
                    methods:{
                        radioF:function(){//radio选择
                            this.detail.status==1?this.detail.status=2:this.detail.status=1;
                        }
                    }
                })
            }else if (item_val==8){//会员注册赠送上网时间
                console.log(123121);
                id_name='give_time';get_config_url='config/get_give_time';ajax_url='config/set_give_time';
                var vm=new Vue({
                    el:'#'+id_name,
                    data:{
                        detail:{
                            value:{}
                        },
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax(get_config_url,{},1).then(function(res){
                            //res.data.status?res.data.status:res.data.status=2;
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        });
                        //提交form
                        form.on('submit(form-submit8)',function(data){

                            var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                            if(data){
                                if(data.value)data.value=JSON.stringify(data.value);
                                layui.admin.ajax(ajax_url,data).then(function(res){
                                    _this.old_detail=JSON.stringify(_this.detail);
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        })
                    },
                    methods:{
                        radioF:function(){//radio选择
                            this.detail.status==1?this.detail.status=2:this.detail.status=1;
                        }
                    }
                })
            }else if (item_val==9){//会员扣费现金比例
                console.log(123121);
                id_name='hotel_ratio';get_config_url='config/get_hotel_ratio';ajax_url='config/set_hotel_ratio';
                var vm=new Vue({
                    el:'#'+id_name,
                    data:{
                        detail:{
                            value:{}
                        },
                        old_detail:{}
                    },
                    mounted:function() {
                        //初始化
                        var _this=this;
                        layui.admin.ajax(get_config_url,{},1).then(function(res){
                            //res.data.status?res.data.status:res.data.status=2;
                            _this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
                        });
                        //提交form
                        form.on('submit(form-submit9)',function(data){

                            var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));
                            if(data){
                                if(data.value)data.value=JSON.stringify(data.value);
                                layui.admin.ajax(ajax_url,data).then(function(res){
                                    _this.old_detail=JSON.stringify(_this.detail);
                                });
                            }else{
                                layer.msg('无修改');
                            }
                        })
                    },

                })
            }

         //   return false;

        });
    })
</script>